package io.renren.controller;

import io.renren.entity.Paomadeng;
import io.renren.vo.RespModel;
import io.renren.service.PaomadengService;
import io.swagger.annotations.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/paomadeng")
@Api(value="/paomadeng",tags="跑马灯")
@Component
public class PaomadengResourceController {
	
	private static final Logger logger  = LoggerFactory.getLogger(PaomadengResourceController.class);

	@Autowired
	private PaomadengService paomadengService;
	
	@PostMapping(value = "/selectAll",produces = MediaType.APPLICATION_JSON_VALUE)
	@ApiOperation(value = "传入start，limit", produces = MediaType.APPLICATION_JSON_VALUE)
	@ApiResponses(value = {
	@ApiResponse(code = 200, message = "OK", response = RespModel.class),
	@ApiResponse(code = 500, message = "服务端异常", response = RespModel.class)})
    @ApiImplicitParam(value="跑马灯请求对象", name = "adPage",dataType = "Paomadeng")
	@com.cxytiandi.encrypt.springboot.annotation.Decrypt
	@com.cxytiandi.encrypt.springboot.annotation.Encrypt
	public RespModel<List<Paomadeng>> selectAll(@RequestBody Paomadeng adPage){
        RespModel<List<Paomadeng>> resp  = paomadengService.selectAll(adPage);
		return resp;
	}

}
